<?php if (!defined('BASEPATH')) {
	exit('No direct script access allowed');
}

class Unapplied_payments_model extends CI_Model {
	public function __construct() {
		parent::__construct();
	}

public function getallaccounts(){
  return $this->db->get('ar_account')->result();
}

public function get_status($num){
        $sql = 'SELECT aa.acct_name, ar.receipt_number, ar.adv_pay FROM ar_account aa
  JOIN ar_unapp_payments_v ar ON ar.`account_id` = aa.`account_id` WHERE aa.account_id = '.$num;
        $q = $this->db->query($sql);
        return $q->result();
}


}